import { createRouter, createWebHistory } from 'vue-router'
import Login from '../components/Login.vue'
import Register from '../components/register.vue'
import FaceRecognition from '../components/face_recognition.vue'
import DangAn from '../components/dang_an.vue'
import Movie from '../components/Movie.vue'
import Test from '../components/test.vue'

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/face-recognition',
    name: 'FaceRecognition',
    component: FaceRecognition
  },
  {
    path: '/dang-an',
    name: 'DangAn',
    component: DangAn
  },
  {
    path: '/movie',
    name: 'Movie',
    component: Movie
  },
  {
    path: '/test',
    name: 'Test',
    component: Test
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/login'
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})